package demo1.config.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

/**
 * @Author quan
 * @Description 读取properties配置文件信息:
 * @Date 2023/7/19 10:04
 */

@Component
public class Demo1_ReadProperties {
    //读取properties配置文件的内容
    @Value("${user1.name1}")
    private String propertiesContent;
    @PostConstruct
    public void postConstruct(){
        System.out.println(propertiesContent);
    }
}
